<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Route::get('getCode', 'Admin\LoginController@getCode');
Route::post('login', 'Admin\LoginController@login');



Route::group(['namespace'=>'Admin','middleware'=>'adminLogin'],function(){
//    dashboard
    Route::get('/', function () {
        return view('welcome');
    });
    Route::get('sideBar','SidebarController@index');
    Route::resource('admin','AdminController');
    Route::resource('cate','CateController');
    Route::resource('resource','ResourceController');
    Route::resource('group','GroupController');
    Route::resource('article','ArticleController');
});